package com.swotxu.config;

import com.swotxu.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

//使用 @PropertySource 读取外部配置文件，添加到运行环境变量中,加载完外部配置文件后使用${}取出配置文件的值
@PropertySource(value= {"classpath:/person.properties"})
@Configuration
public class MainConfigOfPropertyValue {

	@Bean
	public Person person() {
		return new Person();
	}
}
